{include file=header.html}
<script type="text/javascript" src="{lib file=search_goods.js}" charset="utf-8"></script>
<script type="text/javascript">
var upimg   = '{res file=images/up.gif}';
var downimg = '{res file=images/down.gif}';
imgUping = new Image();
imgUping.src = upimg;
$(function(){

	var order = '{$smarty.get.order}';
	var css = '';
	
	<!--{if $smarty.get.order}-->
	order_arr = order.split(' ');
	switch (order_arr[1]){
		case 'desc' : 
			css = 'order-down btn-order-cur';
		break;
		case 'asc' :
			css = 'order-up btn-order-cur';
		break;
		default : 
			css = 'order-down-gray';
	}
	$('.btn-order a[ectype='+order_arr[0]+']').attr('class','btn-order-click '+css);
	<!--{/if}-->
	
	$(".btn-order a").click(function(){
		if(this.id==''){
			dropParam('order');// default order
			return false;
		}
		else
		{
			dd = " desc";
			if(order != '') {
				order_arr = order.split(' ');
				if(order_arr[0]==this.id && order_arr[1]=="desc")
					dd = " asc";
				else dd = " desc";
			}
			replaceParam('order', this.id+dd);
			return false;
		}
	});
	
	<!--{if $smarty.get.price}-->
	var filter_price = '{$smarty.get.price}';
	filter_price = filter_price.split('-');
	$('input[name="start_price"]').val(number_format(filter_price[0],0));
	$('input[name="end_price"]').val(number_format(filter_price[1],0));
	<!--{/if}-->
	
	$('.attr-bottom .show-more').click(function(){
		$(this).parent().parent().children().find('.toggle').toggle();
		if($(this).find('span').html()=='{$lang.expand}'){
			$(this).find('span').html('{$lang.fold}');
			$(this).attr('class', 'hide-more');
		} else {
			$(this).find('span').html('{$lang.expand}');
			$(this).attr('class', '');
		}
	});



});


</script>
<div id="main" class="w-full">
    <div id="page-search-goods" class="w mb20 mt20">
        <div class="w mb10 clearfix">
            <div class="col-main">
                {include file=curlocal.html}
                
                <!--{if $owner_rec_goods}-->
                <div class="owner_rec_goods">
                    <div class="mt">{$lang.hot_recom}</div>
                    <div class="mc">
                        <!--{foreach from=$owner_rec_goods item=goods name=fe_goods}-->
                        <dl>
                            <dt><a target="_blank" href="{url app=goods&id=$goods.goods_id}"><img src="{$goods.default_image}" width="90" height="90" alt="{$goods.goods_name|escape}"></a></dt>
                            <dd>
                                <div class="p-name"><a target="_blank" href="{url app=goods&id=$goods.goods_id}">{$goods.goods_name|escape}</a></div>
                                <div class="p-price">{$lang.special_offer}：<font class="shop_price" style="font-size:14px; color:#DD0000; font-weight:bold;">{$goods.price|price}</font></div>
                                <div class="btns"><a href="{url app=goods&id=$goods.goods_id}">{$lang.view_detail}</a></div>
                            </dd>
                        </dl>
                        <!--{/foreach}-->
                    </div>
                </div>
                <!--{/if}-->
                
                
                <!--{foreach from=$ultimate_store item=store name=fe_store}-->
                <div class="ultimate-store mb10">
                    <div class="item">
                        <div class="content clearfix">
                            <a class="float-left store-logo" href="{url app=store&id=$store.store_id}"><img height="50" class="lazyload" initial-url="{$store.store_logo}" /> </a>
                            <div class="float-left middleside">
                                <a href="{url app=store&id=$store.store_id}">{$store.store_name|escape}</a>
                                <span class="block">{$store.description|escape}</span>
                            </div>
                            <div class="float-right rightside">
                                <b></b><a href="{url app=store&id=$store.store_id}">{$store.store_name|escape}</a>
                            </div>
                        </div>
                    </div>
                </div>
                <!--{/foreach}-->

                <!-- {if !$goods_list_order || $filters} -->
                <div class="attribute">
                    <div class="selected-attr title">
                        <!--{if $filters}-->
                        <strong>{$lang.your_selected}{$lang.colon}</strong>
                        <!--{foreach from=$filters item=filter}-->
                        <a href="javascript:;" id="{$filter.key}"><b>{$filter.name}{$lang.colon}</b>{$filter.value}<span></span></a>
                        <!--{/foreach}-->
                        <!--{else}-->
                        <strong>{$lang.by_conditions}</strong>
                        <!--{/if}-->
                    </div>
                    <div class="content">
                        <!--{if $brands || $price_intervals || $regions || $categories || $props}-->
                        <!--{if $brands && !$filters.brand}-->
                        <div class="each clearfix">
                            <h4>{$lang.by_brand}{$lang.colon}</h4>
                            <div class="pv" ectype="ul_brand">
                                <!--{foreach from=$brands item=row name=fe_row}-->
                                <a href="javascript:void(0);" title="{$row.brand}" id="{$row.brand|escape:url}" {if $smarty.foreach.fe_row.iteration ge 25}class="toggle" style="display:none"{/if}>{$row.brand|escape}<span class="count">({$row.count})</span></a>
                                <!--{/foreach}-->
                            </div>
                        </div>
                        <!--{/if}-->
                        <!--{foreach from=$props item=prop name=fe_prop}-->
                        <div class="each clearfix" ectype="dl_props">
                            <h4>{$prop.name}{$lang.colon}</h4>
                            <div class="pv">
                                <!--{foreach from=$prop.value item=row}-->
                                <a href="javascript:void(0);" id="{$row.pid}:{$row.vid}" selected_props="{$props_selected}">{$row.prop_value|escape}</a>
                                <!--{/foreach}-->
                            </div>
                        </div>
                        <!--{/foreach}-->
                        <!--{if $price_intervals && !$filters.price}-->
                        <div class="each clearfix">
                            <h4>{$lang.by_price}{$lang.colon}</h4>
                            <div class="pv" ectype="ul_price">
                                <!--{foreach from=$price_intervals item=row name=fe_row}-->
                                <a href="javascript:void(0);" id="{$row.min} - {$row.max}" {if $smarty.foreach.fe_row.iteration ge 25}class="toggle" style="display:none"{/if}>{$row.min|price} - {$row.max|price}<span class="count">({$row.count})</span></a>
                                <!--{/foreach}-->
                            </div>
                        </div>
                        <!--{/if}-->

                        <!--{if $regions && !$filters.region_id}-->
                        <div class="each clearfix" style="border-bottom:0;">
                            <h4>{$lang.by_region}{$lang.colon}</h4>
                            <div class="pv" ectype="ul_region">
                                <!--{foreach from=$regions item=row name=fe_row}-->
                                <a href="javascript:void(0);" hidefocus="true" id="{$row.region_id}" title="{$row.region_name|escape}" {if $smarty.foreach.fe_row.iteration ge 25}class="toggle" style="display:none"{/if}>{$row.region_name|escape}<span class="count">({$row.count})</span></a>
                                <!--{/foreach}-->
                            </div>
                        </div>
                        <!--{/if}-->


                        <!--{if $categories}-->
                        <div class="attr-cate">
                            <ul class="attr-list clearfix" style="border-top:0;" ectype="ul_cate">
                                <!--{foreach from=$categories item=gcategory name=fe_gcategory}-->
                                <li><a {if $smarty.get.cate_id==$gcategory.cate_id}style="color:#BF1B30"{/if} href="javascript:void(0);" title="{$gcategory.cate_name}" id="{$gcategory.cate_id}">{$gcategory.cate_name}</a><span>({$gcategory.count})</span></li>
                                <!--{if $smarty.foreach.fe_gcategory.iteration % 5 eq 0 && !$smarty.foreach.fe_gcategory.last}-->
                            </ul>
                            <ul class="attr-list clearfix {if $smarty.foreach.fe_gcategory.iteration ge 25} toggle hidden{/if}" ectype="ul_cate">
                                <!--{/if}-->
                                <!--{/foreach}-->
                            </ul>
                        </div>
                        <!--{/if}-->
                        <!--{/if}-->
                    </div>
                    <div class="attr-bottom">
                        <ins></ins><b class="show-more"><span>{$lang.expend}</span>{$lang.conditions}<i></i></b>
                    </div>
                </div>
                <!--{/if}-->

                <div class="glist w985 mt10">
                    <div class="clearfix">
                        <div class="list-sort">
                            <div class="search-type clearfix">
                                <div class="float-left btn-type">
                                    <a href="{url app=search}" class="current">{$lang.searched_goods}</a>
                                    <!--lichen 2019/5/9 start store-->
                                    <!--<a href="{url app=search&act=store}">{$lang.searched_store}</a>-->
                                    <!--lichen 2019/5/9 end-->
                                </div>
                                <!--{if !$goods_list_order}-->{include file=page.top.html}<!--{/if}-->
                            </div>	
                            <form>
                                <div class="display_mod float-left clearfix">
                                    <a class="qh-list" hidefocus="true" id="list"  href="javascript:;"><i></i>{$lang.list}</a>
                                    <a class="qh-squares" hidefocus="true" id="squares"  href="javascript:;"><i></i>{$lang.big_pic}</a>
                                </div>
                                <div class="float-left btn-order">
                                    <!--<span>{$lang.order_by}{$lang.colon}</span>-->
                                    <!--{foreach from=$orders item=order key=k name=fe_order}-->
                                    <!--{if !$k}-->
                                    <a class="btn-order-click default-sort" id="{$k}" href="javascript:;">{$order}</a>
                                    <!--{else}-->
                                    <a class="btn-order-click order-down-gray" ectype="{$k}" id="{$k}" href="javascript:;">{$order}<i></i></a>
                                    <!--{/if}-->
                                    <!--{/foreach}-->
                                </div>
                                <div class="float-left filter-price">
                                    <div class="filter-price-box">
                                        <b class="fp-input">
                                            <i class="ui-price-plain">&yen;</i>
                                            <input type="text" name="start_price" maxlength="6" value="" />
                                        </b>
                                        <i class="fp-split"></i>
                                        <b class="fp-input">
                                            <i class="ui-price-plain">&yen;</i>
                                            <input type="text" name="end_price" maxlength="6" value="" />
                                        </b>
                                        <a class="ui-btn-s-primary">{$lang.submit}</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!--{if $goods_list_order}-->
                        <div class="goods-empty mb10">{$lang.no_records_and_give_order}</div>
                        <!--{/if}-->
                        <div class="{$display_mode} goods-has clearfix w985" ectype="current_display_mode">
                            <!--{foreach from=$goods_list item=goods name=fe_goods}-->
                            <dl class="item clearfix dl-{$goods.goods_id}" {if !$smarty.foreach.fe_goods.first && $smarty.foreach.fe_goods.iteration%5 eq '0'}style="margin-right:0"{/if}>
                                <dt><a href="{url app=goods&id=$goods.goods_id}" target="_blank"><img class="lazyload"  initial-url="{$goods.default_image}" /></a></dt>
                                <dd class="sub-images sub-images-{$goods.goods_id} ">
                                    <!--{foreach from=$goods._images item=image name=fe_image}-->
                                    <img class="lazyload" initial-url="{$image.thumbnail}" goods_id="{$goods.goods_id}" image_url="{$image.thumbnail}" width="30" height="30" style="{if $smarty.foreach.fe_image.first}border:2px #ddd solid{else}border:2px #ddd solid{/if}"/>
                                    <!--{/foreach}-->
                                </dd>
                                <dd class="price twofloat clearfix"><em>{$goods.price|price}</em><span>{$lang.zjcj}<b>{$goods.sales}</b>{$lang.bi}</span></dd>
                                <dd class="desc"><a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name|escape|truncate:48}</a></dd>
                            <!--lichen 2019/5/10 start store-->
                                <!--<dd class="storeinfo"><a href="{url app=store&id=$goods.store_id}" target="_blank">{$goods.store_name}</a></dd>-->
                            <!--lichen 2019/5/10 end-->
                                <dd class="status clearfix">
                                    <span>{$lang.chengjiao}<em>{$goods.sales|escape}{$lang.bi}</em></span>
                                    <span>{$lang.evaluation}<a href="{url app=goods&act=comments&id=$goods.goods_id}">{$goods.comments|escape}{$lang.bi}</a></span>
                                    <!--{if $goods.im_ww}-->
                                    <a title="{$lang.talking}{$goods.store_name}{$lang.stop_owner}" href="http://amos.im.alisoft.com/msg.aw?v=2&uid={$goods.im_ww|escape:url}&site=cntaobao&s=2&charset={$charset}" target="_blank"><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={$goods.im_ww|escape:url}&site=cntaobao&s=2&charset={$charset}" alt="{$lang.talking}{$goods.store_name}{$lang.stop_owner}" align="absmiddle"/></a>
                                    <!--{/if}-->
                                    <!--{if $goods.im_qq}-->
                                    <!--lichen 2019/5/10 start store-->
                                    <!--<a title="{$lang.talking}{$goods.store_name}{$lang.stop_owner}" href="http://wpa.qq.com/msgrd?V=1&amp;uin={$goods.im_qq|escape}&amp;Site={$goods.store_name|escape}&amp;Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{$goods.im_qq|escape}:4" alt="{$lang.talking}{$goods.store_name}{$lang.stop_owner}" align="absmiddle"></a>-->
                                    <!--lichen 2019/5/10 end-->
                                    <!--{/if}-->
                                </dd>
                            </dl>
                            <!--{/foreach}-->
                        </div>
                        <!--{if !$goods_list_order}-->{include file=page.bottom.html}<!--{/if}-->
                    </div>
                </div>
            </div>
        </div>
        <!--{if $recommend_goods}-->
        <div class="recommend">
            <div class="title"><span></span>{$lang.recommend_goods}</div>
            <div class="content clearfix">
                <!--{foreach from=$recommend_goods item=goods name=fe_goods}-->
                <dl class="mb10">
                    <dt><a href="{url app=goods&id=$goods.goods_id}" target="_blank"><img width="170" height="170" class="lazyload"  initial-url="{$goods.default_image}" /></a></dt>
                    <dd class="desc"><a href="{url app=goods&id=$goods.goods_id}" target="_blank">{$goods.goods_name|escape|truncate:48}</a></dd>
                    <dd class="price twofloat clearfix"><em>{$goods.price}</em><span>{$lang.zjcj}{$goods.sales}{$lang.bi}</span></dd>
                    <dd class="service"></dd>
                </dl>
                <!--{/foreach}-->
            </div>
        </div>
        <!--{/if}-->
    </div>
</div>
{include file=server.html}
{include file=footer.html}
